import { createTypes, toValidableType } from 'vue-types'

const newPropTypes = createTypes({
  func: undefined,
  bool: undefined,
  string: undefined,
  number: undefined,
  object: undefined,
  integer: undefined
})

// 扩展 style 类型，支持 String 和 Object 格式
const propTypes = Object.assign(Object.create(newPropTypes), newPropTypes, {
  get style() {
    return toValidableType('style', {
      type: [String, Object]
    })
  }
})

export { propTypes }
